<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">字段管理</a></li>
        <li><a href="{:url('arctype/arc_index')}">模型管理</a></li>
    </ul>
    <form class="js-ajax-form" action="{:url('arctype/listOrder')}" method="post">
        <div class="table-actions">
            <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">排序</button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50">排序</th>
                <th width="50">ID</th>
                <th>字段标题</th>
                <th>字段名称</th>
                <th>字段分类</th>
                <th>更新时间</th>
                <th width="130">操作</th>
            </tr>
            </thead>
            <tbody>
            <php>
                $types=array('0'=>"自定义","1"=>"系统");
            </php>
            <foreach name="channel" item="vo">
            
                <tr>
                    <td>
                        <input class="input-order" type="text" value="{$vo.sort_order}" readonly>
                    </td>   
                    <td>{$vo.id}</td>
                    <td>{$vo.title}</td>
                    <td>{$vo.name}</td>
                    <td>{$types[$vo['ifsystem']]}</td>
                    <td>{:date('Y-m-d H:i',$vo['update_time'])}</td>
                    <td>
                        <a href="{:url('arctype/channel_edit',array('id'=>$vo['id'],'cid'=>$fieldid))}">编辑</a>
                        <eq name="vo.status" value="1">
                            <a href="{:url('arctype/channel_ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn"
                               data-msg="确定禁用吗？">显示</a>
                            <else/>
                            <a href="{:url('arctype/channel_open',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn"
                               data-msg="确定启用吗？">隐藏</a>
                        </eq>
                        <a href="{:url('arctype/channel_delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
            <tfoot>
            <tr>
                <th width="50">排序</th>
                <th width="50">ID</th>
                <th>字段名称</th>
                <th>字段类型</th>
                <th>字段分类</th>
                <th>更新时间</th>
                <th width="130">操作</th>
            </tr>
            </tfoot>
        </table>
        <style type="text/css">
            .table-actions a{display: inline-block;border:1px solid #ddd;padding: 3px 9px;color: red;}
        </style>
        <div class="table-actions">
            <a href="{:url('arctype/channel_add',array('id'=>$fieldid))}">新增字段</a>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>